<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateWechatMenusTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('wechat_menus', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('parent_id')->commnet('父类编号')->default(0);
            $table->integer('order')->commnet('顺序')->default(0);
            $table->string('name',20)->commnet('名称');
            $table->string('type', 20)->commnet('类型');
            $table->string('url')->commnet('名称')->nullable();
            $table->string('appid')->commnet('小程序AppId')->nullable();
            $table->string('pagepath')->commnet('小程序默认页')->nullable();

            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('wechat_menus');
    }
}
